package com.example.mybatis.builder;


import com.example.mybatis.session.Configuration;
import com.example.mybatis.type.TypeAliasRegistry;

public abstract class BaseBuilder {

    public final Configuration configuration;
    protected final TypeAliasRegistry typeAliasRegistry;

    public BaseBuilder(Configuration configuration) {
        this.configuration = configuration;
        this.typeAliasRegistry = this.configuration.getTypeAliasRegistry();
    }

   public Configuration getConfiguration(){
        return this.configuration;
   }


    protected Class<?> resolveAlias(String alias) {
        return typeAliasRegistry.resolveAlias(alias);
    }

}
